package com.gy.spark.core.actions

import org.apache.spark.{SparkConf, SparkContext}

object Opreator_collect {

  def main(args: Array[String]): Unit = {
    val conf = new SparkConf().setMaster("local").setAppName(this.getClass.getSimpleName)
    val sc = new SparkContext(conf)

    val lines = sc.textFile("./spark/input/words.txt")
    lines.collect().foreach(println)

    sc.stop()
  }

}
